package level4.iso
{
	public class DrawnIsoTile extends IsoObject
	{
		private var color:uint;
		private var isoHeight:Number;
		
		public function DrawnIsoTile(size:Number,color:uint,isoHeight:Number)
		{
			super(size);
			this.color = color;
			this.isoHeight = isoHeight;
			
			draw();
		}
		//绘制菱形边框
		protected function draw():void{
			graphics.clear();
			graphics.lineStyle(1,0xff);
			graphics.beginFill(color);
			graphics.moveTo(-Size,0);
			graphics.lineTo(0,-Size * 0.5);
			graphics.lineTo(Size,0); 
			graphics.lineTo(0,Size * 0.5);
			graphics.lineTo(-Size,0);
			graphics.endFill();
		}
		
		override public function toString():String{
			return "DrawableIsoObject("+IsoPoint+",color:"+color+",height:"+height+")";
		}
		
		////////////////////
		//Getter Setter
		////////////////////
		public function get IsoHeight():Number{
			return isoHeight;
		}
		public function set IsoHeight(value:Number):void{
			isoHeight = value;
		}
		
		public function get Color():uint{
			return color;
		}
		public function set Color(value:uint):void{
			this.color = color;
		}
	}
}